GXSpoolResource
QuickDraw GX sends theGXSpoolResource
message when a resource is about to be added to the spool file. You can override theGXSpoolResource
message to add your own resource to the spool file. Your override of theGXSpoolResource
message must match the following formal declaration:
OSErr MySpoolResource (gxSpoolFile aSpoolFile, Handle aResource, ResType aType, short id);
aSpoolFile
- The spool file to which you are adding resources.
aResource
- A handle to the resource that you want added to the spool file.
aType
- The resource type of the resource that you are adding.
id
- The resource ID of the resource that you are adding.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXSpoolResource
message after a message handler has issued aGXSpoolResource
message to write a resource to the spool file.You can override this message if you need to change the data in a resource that is being added to the spool file. For example, if you are encrypting the data in a spool file, you might want to override this message and encrypt the resource data before it is written
to the file.The default implementation of
GXSpoolResource
expects theaResource
handle to
be a normal memory handle, not a resource. After this message executes, the handle has become a resource handle that the caller cannot use. This behavior is the same as for theAddResource
function, which is described in the chapter "Resource Manager" in
Inside Macintosh: More Macintosh Toolbox.SPECIAL CONSIDERATIONS
You can send theGXSpoolResource
message yourself if you have a resource that you want to store in the spool file.If you are providing your own spooling, you need to totally override the
GXSpoolResource
message and all of the other spooling and despooling messages.If you are not providing your own spooling, you must forward the
GXSpoolResource
message to allow the default implementation to write the data into the spool file.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help